-
Notifications
You must be signed in to change notification settings - Fork 361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: [M3-8553] - DisplayPrice story crash when Currency component's minimumFractionDigits
is negative
#10913
Merged
pmakode-akamai
merged 3 commits into
linode:develop
from
pmakode-akamai:M3-8553-fix-displayprice-story-crash-when-digits-prop-in-currency-component-is-neg
Sep 11, 2024
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pmakode-akamai
requested review from
hana-akamai,
carrillo-erik and
coliu-akamai
and removed request for
a team
September 10, 2024 07:59
pmakode-akamai
changed the title
fix: [M3-8553] - DisplayPrice story crash when Currency Component's
fix: [M3-8553] - DisplayPrice story crash when Currency component's Sep 10, 2024
minimumFractionDigits
is NegativeminimumFractionDigits
is Negative
…inimumFractionDigits is Negative
pmakode-akamai
changed the title
fix: [M3-8553] - DisplayPrice story crash when Currency component's
fix: [M3-8553] - DisplayPrice story crash when Currency component's Sep 10, 2024
minimumFractionDigits
is NegativeminimumFractionDigits
is negative
Coverage Report: ✅ |
coliu-akamai
approved these changes
Sep 10, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great + thanks for adding additional test coverage! 🎉
hana-akamai
approved these changes
Sep 10, 2024
hana-akamai
added
Approved
Multiple approvals and ready to merge!
and removed
Add'tl Approval Needed
Waiting on another approval!
Ready for Review
labels
Sep 10, 2024
This was referenced Sep 13, 2024
nikhagra-akamai
pushed a commit
to nikhagra-akamai/manager
that referenced
this pull request
Sep 23, 2024
…minimumFractionDigits` is negative (linode#10913) * Handle neg digits prop in Currency component to fix DisplayPrice story crash * Added changeset: DisplayPrice story crash when Currency component's minimumFractionDigits is Negative * Update the changeset file
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description 📝
The Storybook for DisplayPrice is crashing when the
minimumFractionDigits
in the Currency component is set with a negative value.This PR addresses the issue by updating the Currency component to handle negative decimalPlaces props correctly. Specifically, it ensures that the
minimumFractionDigits
defaults to 2 when thedecimalPlaces
prop isnegative
orundefined
.Changes 🔄
minimumFractionDigits
in the Currency component will now use the default value (2) whendecimalPlaces
prop isnegative
orundefined
.Target release date 🗓️
N/A
How to test 🧪
Reproduction steps
Verification steps
minimumFractionDigits
in the Currency component uses the default value (2) whendecimalPlaces
prop isnegative
orundefined
.As an Author I have considered 🤔
Check all that apply